class Book:
    identify = '人民出版社'

    def __init__(self, name, price):
        self.name = name
        self.price = price
    @classmethod
    def get_identify(cls):
        return cls.identify
    def get_total_price(self, counts):
        return str(counts) + "本数学类书一共" + str(self.price * counts) + "元"
    @staticmethod
    def packing(A_book, B_book, C_book, D_book):
        lst = [A_book, B_book, C_book, D_book]
        acount = bcount = ccount = 0
        for i in lst:
            if i.name == '计算机类':
                acount += 1
            elif i.name == '英语类':
                bcount += 1
            else:
                ccount += 1

        print("一箱装了", acount, "本", A_book.name, bcount, "本",B_book.name,ccount,
                "本",C_book.name,acount+bcount+ccount, "本书")


A_book = Book('计算机类', 50)
B_book = Book('英语类', 35)
C_book = Book('数学类', 42)
D_book = Book('数学类', 38)
print(Book.get_identify())
print(C_book.get_total_price(5))
Book.packing(A_book, B_book, C_book, D_book)
